package com.fosss.band.service.impl;

import com.fosss.band.entity.Score;
import com.fosss.band.mapper.ScoreMapper;
import com.fosss.band.service.ScoreService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @author: fosss
 * Date: 2023/12/27
 * Time: 20:41
 * Description:
 */
@Service
public class ScoreServiceImpl implements ScoreService {

    @Resource
    private ScoreMapper scoreMapper;


    /**
     * 查询打分记录
     */
    @Override
    public Score getByFanIdAndAlbumId(Integer fanId, Integer albumId) {
        return scoreMapper.getByFanIdAndAlbumId(fanId, albumId);
    }

    /**
     * 添加打分记录
     */
    @Override
    public void addScore(Score score) {
        scoreMapper.insert(score);
    }
}
